home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / FAQ.SWG / 0004_BORLAND - LINKER QA.pas < prev    next >
Pascal/Delphi Source File  |  1993-06-01  |  669b  |  20 lines

  1.  
  2. TP 5.0 5.5 - LINKER ELIMINATES UNUSED DATA
  3. Q. Does the built-in linker eliminate unused data?
  4. A. Yes. Unused code AND data are stripped when you compile to
  5.    disk.  However, if more than one variable is defined in the
  6.    same VAR block and any one is used, the others will not be
  7.    stripped from the .EXE.  For example:
  8.  
  9.      var  A, B: integer;
  10.      var  C: integer;
  11.      begin
  12.        A:= 0;
  13.      end.
  14.  
  15.   In this example, although variable B is never used, it was
  16.   defined in the same block as a variable A. Therefore, B will
  17.   not be linked out.  Variable C will be removed from the .EXE as
  18.   it is not used and is not in the same VAR block.
  19.  
  20.